#include <stdio.h>
#include <stdlib.h>
int main()
{
	char card1[4];
	int val1;
	scanf("%2s",card1);	
	switch(card1[0])
	{
		case'J':
		case'j': 
		case'K':
		case'k':
		case'Q':
		case'q':
		val1=10;
		break;
		default:
			val1=atoi(card1);
	}
	char card2[4];
	int val2;
	scanf("%s",card2);
	switch(card2[0])
	{
		case'J':
		case'j': 
		case'K':
		case'k':
		case'Q':
		case'q':
		val2=10;	
		break;
		default:
			val2=atoi(card2);
	}
	char card3[4];
	int val3;
	scanf("%2s",card3);
	switch(card3[0])
	{
		case'J':
		case'j': 
		case'K':
		case'k':
		case'Q':
		case'q':
		val3=10;
		break;
		default:
			val3=atoi(card3);
	}
	int sum;
	sum=val1+val2+val3;
	if(sum>21)
	{
		printf("you lose the game");
	}
	else if(sum<=21&sum>11)
	{
	    printf("the sum of cards is %d",sum);
	}    
	else if (sum<=11)
	{
		if(val1==1||val2==1||val3==1)
		{
			sum=sum+10;
			printf("the sum of cards is %d",sum);
		}
		}     
		return 0;
}
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
